<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>hello 入门案例</title>
	</head>
	<body>
		<div id="app">
			<h1>今天天气{{info}}</h1>
			<button @click="changeWeather">切换天气</button>
			
		</div>
		
		
		<!-- 引入js -->
		<script src="../js/vue.js"></script>
		<script type="text/javascript">
			new Vue({
				el:'#app',
				data:{
					isHot:true
				},
				computed:{
					info(){
						return this.isHot ? '炎热' : '凉爽'
					}
				},
				methods:{
					changeWeather(){
						this.isHot =!this.isHot
					}
				}
			})
		</script>
	</body>
</html>
